https://bugzilla.gnome.org/show_bug.cgi?id=663461
if (!texture)
{
texture = load (cache, key, data, error);
- if (texture)
+ if (texture && policy == ST_TEXTURE_CACHE_POLICY_FOREVER)
g_hash_table_insert (cache->priv->keyed_cache, g_strdup (key), texture);
- else
- return NULL;
}
- cogl_object_ref (texture);
+ if (texture && policy == ST_TEXTURE_CACHE_POLICY_FOREVER)
+ cogl_object_ref (texture);
+
return texture;
}
return COGL_INVALID_HANDLE;
key = corner_to_string (&corner);
- texture = st_texture_cache_load (cache, key, ST_TEXTURE_CACHE_POLICY_NONE, load_corner, &corner, NULL);
+ texture = st_texture_cache_load (cache, key, ST_TEXTURE_CACHE_POLICY_FOREVER, load_corner, &corner, NULL);
if (texture)
{